import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import PressFlow from '../views/PressFlow.vue'
import Login from '../views/Login.vue'
import CommonSense from '../views/CommonSense.vue'
import ComsenseDetail from '../views/ComsenseDetail.vue'
import NewBook from '../views/NewBook.vue'
import BookDetail from '../views/NewBookDetail.vue'
import Publish from '../views/PublishHouse.vue'
import Company from '../views/Company.vue'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: 'home',
    component: HomeView
  },

  {
    path: '/pressflow',
    name: 'pressflow',
    // component: () => import(/* webpackChunkName: "about" */ '../views/PressFlow.vue')
    component:PressFlow
  },
  {
    path:'/comsense',
    component:CommonSense,

  },
  {
    path:'/detail',
    name:'detail',
    component:ComsenseDetail
  },
  {
    path:'/newbook',
    name:'newbook',
    component:NewBook
  },
  {
    path:'/bookdetail',
    name:'bookdetail',
    component:BookDetail
  },
  {
    path:'/publish',
    name:'publish',
    component:Publish
  },
  {
    path:'/company',
    name:'company',
    component:Company
  },
  
  {
    path: '/login',    
    meta: { title: '登录' },
    name: 'login',
    // component: (resolve) => import(/* webpackChunkName: "login" */ '../views/Login.vue')
    component:Login
},
{
    path: '*',
    redirect: '/404'
},
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
